package com.example.zjx8969.myapplication.dialogManager

import android.content.DialogInterface
import android.os.Bundle
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentManager

class QueueDialogImpByFragmentDialog(private val fragmentManagerOfParent: FragmentManager,
                                     override var listener: DialogInterface.OnDismissListener) : AbstractQueueDialog, DialogFragment() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        addOnDialogDismissListener(listener)
    }

    override fun showDialog(): Boolean {
        fragmentManagerOfParent.beginTransaction().show(this).commitAllowingStateLoss()
        return true
    }
}